#ifndef __MSQ_H__
#define __MSQ_H__

#define QUEUE_SIZE 10

typedef struct {
    int buffer[QUEUE_SIZE];
    int head, tail, count;
    pthread_mutex_t mutex;
    pthread_cond_t not_empty;
    pthread_cond_t not_full;
} MsgQueue;

void init_queue(MsgQueue *q);
void enqueue(MsgQueue *q, int value);
int dequeue(MsgQueue *q);


#endif